package org.future.wsdl.data;

import java.util.ArrayList;
import java.util.List;


/**
 * wsdl:portType 元素信息
 * @author dycc
 *
 */
public class WsdlPortType {
    
    private String name;
    
    private List<WsdlOperation> operations = new ArrayList<WsdlOperation>();
    
    private List<WsdlBinding> wsdlBindings = new ArrayList<WsdlBinding>();
    
    // name
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }
    // operations
    public List<WsdlOperation> getOperations() {
        return operations;
    }
    public void setOperations(List<WsdlOperation> operations) {
        this.operations = operations;
    }
    // wsdlBindgs
    public List<WsdlBinding> getWsdlBindings() {
        return wsdlBindings;
    }
    public void setWsdlBindings(List<WsdlBinding> wsdlBindings) {
        this.wsdlBindings = wsdlBindings;
    }
    
    /**
     * toString
     */
    public String toString(){
        StringBuffer sb = new StringBuffer();
        sb.append("<wsdl:portType name=\"" + name + "\">");
        sb.append("\n");
        for(int i=0;i<operations.size();i++){
            sb.append(operations.get(i));
            sb.append("\n");
        }
        sb.append("</wsdl:portType>");
        return sb.toString();
    }
}
